package com.xilihui.xlh.business.activitys.store;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.xilihui.xlh.R;
import com.xilihui.xlh.component.recyclerview.BaseAdapter;
import com.xilihui.xlh.component.recyclerview.BaseViewHolder;
import com.xilihui.xlh.core.app.BaseCompatActivity;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/10/10.
 */

public class CollectListActivity extends BaseCompatActivity implements OnRefreshListener, OnLoadMoreListener {
    
    @BindView(R.id.smartRefreshLayout)
    SmartRefreshLayout smartRefreshLayout;
    @BindView(R.id.recyclerview)
    RecyclerView recyclerView;
    
    ArrayList<String> data = new ArrayList<>();
    BaseAdapter<String> baseAdapter;
    
    @Override
    public int getLayout() {
        return R.layout.activity_collect;
    }

    @Override
    public String initTitle() {
        return "我的收藏";
    }

    @Override
    public void initUI(@Nullable Bundle savedInstanceState) {
        
        smartRefreshLayout.setOnRefreshListener(this);
        smartRefreshLayout.setOnLoadMoreListener(this);
        
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        
        for (int i=0;i<10;i++){
            data.add("");
        }
        
        baseAdapter = new BaseAdapter<String>(this,data) {
            @Override
            protected int setLayoutId() {
                return 0;
            }

            @Override
            protected void getView(BaseViewHolder holder, String entity, int position) {
                
            }
        };
        
    }

    @Override
    public void initData() {
        
    }

    @Override
    public void onRefresh(@NonNull RefreshLayout refreshLayout) {
        
    }

    @Override
    public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
        
    }
}
